#ifndef OBJECTMANAGER_H_INCLUDED
#define OBJECTMANAGER_H_INCLUDED

#include "XGE_Common.h"
#include "IManager.h"
#include "Manager.h"
#include "Object.h"
#include "ObjectComponent.h"

namespace XGE
{
    class ObjectManager : public Manager<XGE::Object>, public IManager
    {
        protected:
            ObjectComponentMap ObjectComponentTypes;

        public:
            ObjectManager(const Ogre::String& nName) : Manager<XGE::Object>(nName), IManager(strName) {};
            ~ObjectManager() {};

            //Manager initialisation - set and return 'active'
            virtual bool init();
            //Update
            virtual bool _update();

            bool registerComponentType(XGE::ObjectComponent* nOC);
            XGE::ObjectComponent* addComponent(XGE::Object* nObj, const Ogre::String& nOCName, const Ogre::String& nOCTypeName);
            XGE::ObjectComponent* getComponent(XGE::Object* nObj, const Ogre::String& nOCName);
            void delComponent(XGE::Object* nObj, XGE::ObjectComponent* nOC);
    };
}

#endif // OBJECTMANAGER_H_INCLUDED
